package io.huaguoguo.spring.listener;

import io.huaguoguo.spring.event.GroupChatEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;

/**
 * 描述：  <br>
 * CreateDate: 2021/5/28 <br>
 *
 * @author huaguoguo
 */
@Slf4j
public class ChatListener implements ApplicationListener<GroupChatEvent> {

    protected String name;

    @Override
    public void onApplicationEvent(GroupChatEvent event) {
        System.out.println(Thread.currentThread().getName() + ":" + name + "接收到了消息:" + event.getMessage());
    }


}
